package model;

public class VCardEditable extends VCardWrapper {
	
	private AddressEditable address; 
	private String company;
	private String email;
	private PhoneNumberEditable fax;
	private PhoneNumberEditable phone;
	private String prename;
	private String lastname;
	
	public VCardEditable() {
		super();
		address = null;
		company = null;
		email = null;
		fax = null;
		phone = null;
		prename = null;
		lastname = null;
	}
	
	




	
	

	@Override
	public boolean existsAddress() {
		if(this.address == null) return false;
		return true;
	}

	@Override
	public boolean existsCompanyName() {
		if(this.company == null || this.company.trim().length() == 0) return false;
		return true;
	}

	@Override
	public boolean existsEmail() {
		if(this.email == null || this.email.trim().length() == 0) return false;
		return true;
	}

	@Override
	public boolean existsFax() {
		if(this.fax == null) return false;
		return true;
	}

	@Override
	public boolean existsLastName() {
		if(this.lastname == null || this.lastname.trim().length() == 0) return false;
		return true;
	}

	@Override
	public boolean existsPhone() {
		if(this.phone == null) return false;
		return true;
	}

	@Override
	public boolean existsPreName() {
		if(this.prename == null || this.prename.trim().length() == 0) return false;
		return true;
	}

	@Override
	public AddressWrapper getAddress() {
		return this.address;
	}

	@Override
	public String getCompanyName() {
		return this.company;
	}

	@Override
	public String getEmail() {
		return this.email;
	}

	@Override
	public PhoneNumberWrapper getFax() {
		return this.fax;
	}

	@Override
	public String getLastName() {
		return this.lastname;
	}

	@Override
	public PhoneNumberWrapper getPhone() {
		return this.phone;
	}

	@Override
	public String getPreName() {
		return this.prename;
	}

	@Override
	public void setCompanyName(String name) {
		this.company = name;
	}

	@Override
	public void setEmail(String emailaddr) {
		this.email = emailaddr;
	}

	@Override
	public void setLastName(String name) {
		this.lastname = name;
	}

	@Override
	public void setPreName(String name) {
		this.prename = name;
	}
	
	public void setPhone(String a, String b, String c) {
		this.phone = new PhoneNumberEditable(a,b,c);
	}
	
	public void setFax(String a, String b, String c) {
		this.fax = new PhoneNumberEditable(a,b,c);
	}
	
	public void setAddress(String a, String b, String c, String d, String e) {
		this.address = new AddressEditable(a,b,c,d,e);
	}
	
	
}